/*
 * Copyright (c) 2013-2014, thinkjoy Inc. All Rights Reserved.
 *
 * Project Name: wy
 * $Id:  UserAccountServiceImpl.java 2016-01-25 16:45:05 $
 */
package com.wy.service.impl.ex;

import com.wy.dao.ex.IUserAccountExDAO;
import com.wy.dto.war.UserAccountDto;
import com.wy.service.ex.IUserAccountExService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;


@Service("UserAccountExServiceImpl")
public class UserAccountExServiceImpl implements IUserAccountExService{

    @Autowired
    private IUserAccountExDAO userAccountExDAO;

    @Override
    public UserAccountDto findUserAccountDtoByToken(String token) {
        Map<String,Object> params = new HashMap<>();
        params.put("token",token);
        return userAccountExDAO.findUserAccountDto(params);
    }

    @Override
    public UserAccountDto findUserAccountDtoByAccount(String account) {
        Map<String,Object> params = new HashMap<>();
        params.put("account",account);
        return userAccountExDAO.findUserAccountDto(params);
    }

    @Override
    public UserAccountDto findUserAccountDtoById(Long id) {
        Map<String,Object> params = new HashMap<>();
        params.put("id",id);
        return userAccountExDAO.findUserAccountDto(params);
    }
}
